<template>
  <div class="mittTest2">
    <h1>这里是发送数据的页面</h1>
    <button @click="sendToy">发送数据</button>
  </div>
</template>
<script lang="ts" setup>
import emitter from "@/utils/emitter";
import { ref } from "vue";
// 方法
function sendToy() {
  // 触发事件
  emitter.emit("send-toy", "123");
}
</script>
<style scoped>
.mittTest2 {
  width: 80vw;
  height: 80vh;
  border: 1px solid red;
}
</style>
